package com.grao.waterschool.human.utils;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author limk
 */
@Data
@Schema(name = "通用分页查询参数")
public class PageParam {

    @Schema(description = "页码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer pageNum = 1;

    @Schema(description = "分页大小", example = "20")
    private Integer pageSize = 20;

    public Integer getPageNum() {
        return (pageNum - 1) * pageSize;
    }
}
